Skip to content

Conversation

@annvelents
Copy link
Contributor

Context

As part of deconstruction of a big PR responsible for creating fixed charges fees, we need these missing updates in the models

Description

  • added new scope to a fixed_charge

  • fix validations to not throw warnings during tests

  • added included_in_next_subscription to a fixed charge

  • added fixed_charge boundaries to subscription's adjusted_boundaries

@annvelents annvelents force-pushed the feat/fixed_charge-16/fixed_charge_fee_creation-1 branch 5 times, most recently from fd5b1bf to 23a842d Compare October 16, 2025 18:06
fixed_charges_duration: dates_service.fixed_charges_duration_in_days
)

InvoiceSubscription.matching?(self, previous_period_boundaries) ? boundaries : previous_period_boundaries
Copy link
Contributor Author

@annvelents annvelents Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we start populating this values, will it break? (comparing new invoice with stored in the db)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

firstly we want to make sure that subscriptions have these values! then we'll do some population of this values, and only after we can rely on this logic of adding fixed_charges into the comparison :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancel all the worries, it only applies if "fixed_charges_billed_in_monthly_split_intervals" - plan is yearly, fixed_charges are applied monthly 😌

@annvelents annvelents force-pushed the feat/fixed_charge-16/fixed_charge_fee_creation-1 branch from 23a842d to 0e08a5b Compare October 23, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants